(function(_,$){
	var UI = function(){
		
		this.uid = _.Util.guid();	//唯一编号
		this.config = {
			id : null,
			top : 0,
			left : 0,
			container : "body"
		};
		
		this.jQuery = null;
		
		this.id = function(_id){
			if(_id == undefined){
				return this.config.id;
			}else{
				this.config.id = _id;
				if(this.jQuery){
					this.jQuery.attr("id",this.config.id);
				}
				return this;
			}
		};
		
		/**
		 * 设置容器
		 * @param _container	容器
		 */
		this.container = function(_container){
			if(_container == undefined){
				return $(this.config.container);
			}else{
				this.config.container = _container;
				if(this.jQuery){
					this.jQuery.appendTo($(this.config.container));
				}
				return this;
			}
		};
		
		/**
		 * 设置top值
		 * @param	_top	top值
		 */
		this.top = function(_top){
			if(_top == undefined){
				return this.config.top;
			}else{
				this.config.top = _top;
				if(this.jQuery){
					this.jQuery.css("top",this.config.top);
					this.jQuery.attr("jdmer_top",this.config.top);
				}
				return this;
			}
		};
		
		/**
		 * 设置left值
		 * @param	_left	left值
		 */
		this.left = function(_left){
			if(_left == undefined){
				return this.config.left;
			}else{
				this.config.left = _left;
				if(this.jQuery){
					this.jQuery.css("left",this.config.left);
					this.jQuery.attr("jdmer_left",this.config.left);
				}
				return this;
			}
		};
	};
	_.UI = UI;
})(jDreamer,jQuery);